@charset "utf-8";
body {
    min-width:880px;
}


form span::selection {
    background: transparent;
}

input[type=text],
input[type=password] {
    border-radius: 4px;
    padding-left: 4px;
}


/*登录界面*/

.loginBox {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 9999;
    background: palegoldenrod;
    opacity: 1;
    transition: all 1s;
}

.loginBox form {
    width: 20%;
    height: 20%;
    margin: 10% auto 0;
    background: palevioletred;
    padding: 5%;
    border: 2px solid dodgerblue;
    border-radius: 5px;
    box-sizing: content-box;
}

.loginBox form label {
    width: 100%;
    overflow: hidden;
}

.loginBox form label input {
    width: 70%;
    height: 20px;
    float: right;
    margin-top: 2px;
}

.loginBox label span {
    display: block;
    overflow: hidden;
    text-align: center;
    color: whitesmoke;
    margin-bottom: 5%;
}

.loginBox form [value] {
    width: 40%;
    height: 20%;
    background: whitesmoke;
    border: 1px solid #999;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    margin-top: 10%;
    font-weight: 700;
    font-size: 16px;
    color: deepskyblue;
}

.loginBox form [type^="sub"] {
    float: left;
}

.loginBox form [type^="button"] {
    float: right;
}


/*注册盒子*/

.register {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: rgba(150, 150, 150, .8);
    opacity: 0;
    transition: all 1s;
}

.right {
    box-shadow: 0 0 4px palegreen;
}

.false {
    box-shadow: 0 0 4px #ff6666;
}

.register form {
    width: 30%;
    height: 40%;
    margin: 10% auto 0;
    background: whitesmoke;
    border: 3px solid #666;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 5px;
    position: relative;
}

.register form label {
    position: relative;
}

.register form label input {
    float: right;
    width: 60%;
    height: 20px;
    margin-top: 2px;
}

.register form label span {
    display: block;
    overflow: hidden;
    height: 20px;
}

.register form label span+span {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-15%);
    width: 40%;
    height: 15px;
    border-radius: 2px;
    transition: all .5s;
    opacity: 0;
    font: 400 10px/15px "microsoft yahei";
    text-align: center;
    color: #ff6666;
}

.register form label span+span.right {
    color: seagreen;
}

.register form div {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.register form input[value] {
    border: 1px solid #666;
    border-radius: 5px;
    width: 40%;
    height: 25px;
    outline: none;
    cursor: pointer;
    background: #eee;
    color: #ff6666;
    font-size: 18px;
    font-weight: 700;
}


/*信息记录*/

.msg {
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    height: 100%;
    background: palegoldenrod;
    border: 5px solid palevioletred;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 5% 0 15%;
    color: seagreen;
}

.msg div {
    text-align: center;
    color: dodgerblue;
}

.msg h3 {
    text-indent: 20px;
}


/*游戏盒子*/

.box {
    box-sizing: content-box;
    background: whitesmoke;
    border: 3px solid seagreen;
    margin: 5% auto 0;
    overflow: hidden;
    position: relative;
}

.col {
    width: 100%;
    height: 100%;
    position: relative;
}

.col li {
    width: 15px;
    height: 15px;
    float: left;
    border: 1px solid #aaa;
}

.col li.food {
    background: deepskyblue;
}

.snake {
    position: absolute;
    top: 0;
    left: 0;
}

.snake li {
    background: dodgerblue;
    position: absolute;
    width: 15px;
    height: 15px;
    top: 0;
    left: 0;
    border: 1px solid palegoldenrod;
}

.snake .header {
    background: palevioletred;
}

.snake .header.end {
    background: #ff6666;
    z-index: 100;
}


/*遮盖盒子*/

.mask {
    background: #666666;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    transition: all 1s;
    opacity: 0;
}

.mask .btn {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 50px;
    display: flex;
    background: whitesmoke;
    border-radius: 10px;
    transform: translate(-50%, -50%);
}

.btn1,
.btn2 {
    flex: 1;
    text-align: center;
    border-radius: 6px;
    font: 700 20px/50px "microsoft yahei";
}

.btn1 {
    color: dodgerblue;
}

.btn1:hover,
.btn2:hover {
    background: #ccc;
    cursor: pointer;
}

.btn2 {
    color: palevioletred;
}


/*排行榜*/

.rank {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    opacity: 0;
    z-index: -1;
    transition:all 1s;
}

.rank ul {
    width: 80%;
    height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: paleturquoise;
    border-radius: 10%;
    padding: 10% 12%;
}

.rank ul li {
    height: 40px;
    border-radius: 10px;
    border-bottom: 2px solid #999;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    color: #999;
    font: 700 16px/40px 'microsoft yahei';
}

.rank ul li:nth-child(1) {
    border-bottom: 2px solid #f66;
    color: #f66;
}

.rank ul li:nth-child(2) {
    border-bottom: 2px solid dodgerblue;
    color: dodgerblue;
}

.rank ul li:nth-child(3) {
    border-bottom: 2px solid mediumseagreen;
    color: mediumseagreen;
}